<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
      <title>Class SynList&lt;T&gt; | HiAPI-C# 2025 </title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta name="title" content="Class SynList&lt;T&gt; | HiAPI-C# 2025 ">
      
      <meta name="description" content="Thread-safe List.">
      <link rel="icon" href="../img/HiAPI.favicon.ico">
      <link rel="stylesheet" href="../public/docfx.min.css">
      <link rel="stylesheet" href="../public/main.css">
      <meta name="docfx:navrel" content="../toc.html">
      <meta name="docfx:tocrel" content="toc.html">
      
      <meta name="docfx:rel" content="../">
      
      
      
      <meta name="loc:inThisArticle" content="In this article">
      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
      <meta name="loc:tocFilter" content="Filter by title">
      <meta name="loc:nextArticle" content="Next">
      <meta name="loc:prevArticle" content="Previous">
      <meta name="loc:themeLight" content="Light">
      <meta name="loc:themeDark" content="Dark">
      <meta name="loc:themeAuto" content="Auto">
      <meta name="loc:changeTheme" content="Change theme">
      <meta name="loc:copy" content="Copy">
      <meta name="loc:downloadPdf" content="Download PDF">

      <script type="module" src="./../public/docfx.min.js"></script>

      <script>
        const theme = localStorage.getItem('theme') || 'auto'
        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
      </script>

  </head>

  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
    <header class="bg-body border-bottom">
      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
        <div class="container-xxl flex-nowrap">
          <a class="navbar-brand" href="../index.html">
            <img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
            
          </a>
          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
            <i class="bi bi-three-dots"></i>
          </button>
          <div class="collapse navbar-collapse" id="navpanel">
            <div id="navbar">
              <form class="search" role="search" id="search">
                <i class="bi bi-search"></i>
                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
              </form>
            </div>
          </div>
        </div>
      </nav>
    </header>

    <main class="container-xxl">
      <div class="toc-offcanvas">
        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
          <div class="offcanvas-header">
            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
          </div>
          <div class="offcanvas-body">
            <nav class="toc" id="toc"></nav>
          </div>
        </div>
      </div>

      <div class="content">
        <div class="actionbar">
          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
            <i class="bi bi-list"></i>
          </button>

          <nav id="breadcrumb"></nav>
        </div>

        <article data-uid="Hi.Common.Collections.SynList`1">



  <h1 id="Hi_Common_Collections_SynList_1" data-uid="Hi.Common.Collections.SynList`1" class="text-break">
Class SynList&lt;T&gt;  
  </h1>

  <div class="facts text-secondary">
    <dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.Common.html">Common</a>.<a class="xref" href="Hi.Common.Collections.html">Collections</a></dd></dl>
  <dl><dt>Assembly</dt><dd>HiGeom.dll</dd></dl>
  </div>

  <div class="markdown summary"><p>Thread-safe List.</p>
</div>
  <div class="markdown conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class SynList&lt;T&gt; : IList&lt;T&gt;, ICollection&lt;T&gt;, IEnumerable&lt;T&gt;, IEnumerable</code></pre>
  </div>



  <h4 class="section">Type Parameters</h4>
  <dl class="parameters">
    <dt><code>T</code></dt>
    <dd><p>T</p>
</dd>
  </dl>

  <dl class="typelist inheritance">
    <dt>Inheritance</dt>
    <dd>
      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
      <div><span class="xref">SynList&lt;T&gt;</span></div>
    </dd>
  </dl>

  <dl class="typelist implements">
    <dt>Implements</dt>
    <dd>
      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;T&gt;</div>
      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;T&gt;</div>
      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;T&gt;</div>
      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    </dd>
  </dl>

  <dl class="typelist derived">
    <dt>Derived</dt>
    <dd>
      <div><a class="xref" href="Hi.Disp.DispList.html">DispList</a></div>
    </dd>
  </dl>

  <dl class="typelist inheritedMembers">
    <dt>Inherited Members</dt>
    <dd>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
    </div>
  </dd></dl>

  <dl class="typelist extensionMethods">
    <dt>Extension Methods</dt>
    <dd>
  <div>
      <a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_ToDotSplitedString__1_System_Collections_Generic_IEnumerable___0__">StringUtil.ToDotSplitedString&lt;T&gt;(IEnumerable&lt;T&gt;)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetCeilIndex__2_System_Collections_Generic_IList___0____1_System_Func___0___1_System_Int32__System_Int32__">ListUtil.GetCeilIndex&lt;Item, ItemKey&gt;(IList&lt;Item&gt;, ItemKey, Func&lt;Item, ItemKey, int&gt;, out int)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetCeilIndex__2_System_Collections_Generic_IList___1____0_System_Func___1___0__System_Int32__">ListUtil.GetCeilIndex&lt;TKey, Item&gt;(IList&lt;Item&gt;, TKey, Func&lt;Item, TKey&gt;, out int)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetCeil__2_System_Collections_Generic_IList___1____0_System_Func___1___0____1__">ListUtil.GetCeil&lt;TKey, Item&gt;(IList&lt;Item&gt;, TKey, Func&lt;Item, TKey&gt;, out Item)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetFloorIndex__2_System_Collections_Generic_IList___0____1_System_Func___0___1_System_Int32__System_Int32__">ListUtil.GetFloorIndex&lt;Item, ItemKey&gt;(IList&lt;Item&gt;, ItemKey, Func&lt;Item, ItemKey, int&gt;, out int)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetFloorIndex__2_System_Collections_Generic_IList___1____0_System_Func___1___0__System_Int32__">ListUtil.GetFloorIndex&lt;TKey, Item&gt;(IList&lt;Item&gt;, TKey, Func&lt;Item, TKey&gt;, out int)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetFloor__2_System_Collections_Generic_IList___1____0_System_Func___1___0____1__">ListUtil.GetFloor&lt;TKey, Item&gt;(IList&lt;Item&gt;, TKey, Func&lt;Item, TKey&gt;, out Item)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexBasedEnumerable__1_System_Collections_Generic_IList___0__">ListUtil.GetIndexBasedEnumerable&lt;TItem&gt;(IList&lt;TItem&gt;)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexBasedEnumerable__1_System_Collections_Generic_IList___0__System_Int32_System_Int32_">ListUtil.GetIndexBasedEnumerable&lt;TItem&gt;(IList&lt;TItem&gt;, int, int)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexByBinarySearch__1_System_Collections_Generic_IList___0____0_">ListUtil.GetIndexByBinarySearch&lt;TItem&gt;(IList&lt;TItem&gt;, TItem)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexByBinarySearch__1_System_Collections_Generic_IList___0____0_System_Collections_Generic_IComparer___0__">ListUtil.GetIndexByBinarySearch&lt;TItem&gt;(IList&lt;TItem&gt;, TItem, IComparer&lt;TItem&gt;)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexByBinarySearch__2_System_Collections_Generic_IList___0____1_System_Func___1___0_System_Int32__">ListUtil.GetIndexByBinarySearch&lt;TItem, TSearch&gt;(IList&lt;TItem&gt;, TSearch, Func&lt;TSearch, TItem, int&gt;)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetNearestIndex__2_System_Collections_Generic_IList___0____1_System_Func___0___1_System_Double__System_Int32__">ListUtil.GetNearestIndex&lt;TItem, TItemKey&gt;(IList&lt;TItem&gt;, TItemKey, Func&lt;TItem, TItemKey, double&gt;, out int)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetNearestIndex__2_System_Collections_Generic_IList___0____1_System_Func___0___1_System_Int32__System_Func___0___1_System_Double__System_Int32__">ListUtil.GetNearestIndex&lt;TItem, TItemKey&gt;(IList&lt;TItem&gt;, TItemKey, Func&lt;TItem, TItemKey, int&gt;, Func&lt;TItem, TItemKey, double&gt;, out int)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_Swap__1_System_Collections_Generic_IList___0__System_Int32_System_Int32_">ListUtil.Swap&lt;TItem&gt;(IList&lt;TItem&gt;, int, int)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
  </div>
  <div>
      <a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
  </div>
  </dd></dl>





  <h2 class="section" id="constructors">Constructors
</h2>


  <a id="Hi_Common_Collections_SynList_1__ctor_" data-uid="Hi.Common.Collections.SynList`1.#ctor*"></a>

  <h3 id="Hi_Common_Collections_SynList_1__ctor_Hi_Common_Collections_SynList__0__" data-uid="Hi.Common.Collections.SynList`1.#ctor(Hi.Common.Collections.SynList{`0})">
  SynList(SynList&lt;T&gt;)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public SynList(SynList&lt;T&gt; src)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>src</code> <a class="xref" href="Hi.Common.Collections.SynList-1.html">SynList</a>&lt;T&gt;</dt>
    <dd></dd>
  </dl>












  <a id="Hi_Common_Collections_SynList_1__ctor_" data-uid="Hi.Common.Collections.SynList`1.#ctor*"></a>

  <h3 id="Hi_Common_Collections_SynList_1__ctor_System_Collections_Generic_IEnumerable__0__" data-uid="Hi.Common.Collections.SynList`1.#ctor(System.Collections.Generic.IEnumerable{`0})">
  SynList(IEnumerable&lt;T&gt;)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public SynList(IEnumerable&lt;T&gt; ts)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>ts</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;T&gt;</dt>
    <dd></dd>
  </dl>












  <a id="Hi_Common_Collections_SynList_1__ctor_" data-uid="Hi.Common.Collections.SynList`1.#ctor*"></a>

  <h3 id="Hi_Common_Collections_SynList_1__ctor_System_Int32_" data-uid="Hi.Common.Collections.SynList`1.#ctor(System.Int32)">
  SynList(int)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public SynList(int cap = 8)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>cap</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
    <dd></dd>
  </dl>












  <h2 class="section" id="properties">Properties
</h2>


  <a id="Hi_Common_Collections_SynList_1_Count_" data-uid="Hi.Common.Collections.SynList`1.Count*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_Count" data-uid="Hi.Common.Collections.SynList`1.Count">
  Count
  
  </h3>

  <div class="markdown level1 summary"><p>Gets the number of elements contained in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public int Count { get; }</code></pre>
  </div>





  <h4 class="section">Property Value</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
    <dd><p>The number of elements contained in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</dd>
  </dl>








  <a id="Hi_Common_Collections_SynList_1_Data_" data-uid="Hi.Common.Collections.SynList`1.Data*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_Data" data-uid="Hi.Common.Collections.SynList`1.Data">
  Data
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public List&lt;T&gt; Data { get; set; }</code></pre>
  </div>





  <h4 class="section">Property Value</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;T&gt;</dt>
    <dd></dd>
  </dl>








  <a id="Hi_Common_Collections_SynList_1_IsReadOnly_" data-uid="Hi.Common.Collections.SynList`1.IsReadOnly*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_IsReadOnly" data-uid="Hi.Common.Collections.SynList`1.IsReadOnly">
  IsReadOnly
  
  </h3>

  <div class="markdown level1 summary"><p>Gets a value indicating whether the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> is read-only.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool IsReadOnly { get; }</code></pre>
  </div>





  <h4 class="section">Property Value</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
    <dd><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> is read-only; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p>
</dd>
  </dl>








  <a id="Hi_Common_Collections_SynList_1_Item_" data-uid="Hi.Common.Collections.SynList`1.Item*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_Item_System_Int32_" data-uid="Hi.Common.Collections.SynList`1.Item(System.Int32)">
  this[int]
  
  </h3>

  <div class="markdown level1 summary"><p>Gets or sets the element at the specified index.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public T this[int index] { get; set; }</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
    <dd><p>The zero-based index of the element to get or set.</p>
</dd>
  </dl>




  <h4 class="section">Property Value</h4>
  <dl class="parameters">
    <dt><span class="xref">T</span></dt>
    <dd><p>The element at the specified index.</p>
</dd>
  </dl>





  <h4 class="section">Exceptions</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
    <dd><p><code class="paramref">index</code> is not a valid index in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a>.</p>
</dd>
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
    <dd><p>The property is set and the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a> is read-only.</p>
</dd>
  </dl>



  <a id="Hi_Common_Collections_SynList_1_Lock_" data-uid="Hi.Common.Collections.SynList`1.Lock*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_Lock" data-uid="Hi.Common.Collections.SynList`1.Lock">
  Lock
  
  </h3>

  <div class="markdown level1 summary"><p>Lock object, which is <a class="xref" href="Hi.Common.Collections.SynList-1.html#Hi_Common_Collections_SynList_1_Data">Data</a></p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public object Lock { get; }</code></pre>
  </div>





  <h4 class="section">Property Value</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
    <dd></dd>
  </dl>








  <h2 class="section" id="methods">Methods
</h2>


  <a id="Hi_Common_Collections_SynList_1_Add_" data-uid="Hi.Common.Collections.SynList`1.Add*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_Add__0_" data-uid="Hi.Common.Collections.SynList`1.Add(`0)">
  Add(T)
  
  </h3>

  <div class="markdown level1 summary"><p>Adds an item to the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Add(T item)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>item</code> <span class="xref">T</span></dt>
    <dd><p>The object to add to the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</dd>
  </dl>









  <h4 class="section">Exceptions</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
    <dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> is read-only.</p>
</dd>
  </dl>



  <a id="Hi_Common_Collections_SynList_1_Clear_" data-uid="Hi.Common.Collections.SynList`1.Clear*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_Clear" data-uid="Hi.Common.Collections.SynList`1.Clear">
  Clear()
  
  </h3>

  <div class="markdown level1 summary"><p>Removes all items from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Clear()</code></pre>
  </div>










  <h4 class="section">Exceptions</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
    <dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> is read-only.</p>
</dd>
  </dl>



  <a id="Hi_Common_Collections_SynList_1_Contains_" data-uid="Hi.Common.Collections.SynList`1.Contains*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_Contains__0_" data-uid="Hi.Common.Collections.SynList`1.Contains(`0)">
  Contains(T)
  
  </h3>

  <div class="markdown level1 summary"><p>Determines whether the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> contains a specific value.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Contains(T item)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>item</code> <span class="xref">T</span></dt>
    <dd><p>The object to locate in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</dd>
  </dl>

  <h4 class="section">Returns</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
    <dd><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if <code class="paramref">item</code> is found in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p>
</dd>
  </dl>











  <a id="Hi_Common_Collections_SynList_1_CopyTo_" data-uid="Hi.Common.Collections.SynList`1.CopyTo*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_CopyTo__0___System_Int32_" data-uid="Hi.Common.Collections.SynList`1.CopyTo(`0[],System.Int32)">
  CopyTo(T[], int)
  
  </h3>

  <div class="markdown level1 summary"><p>Copies the elements of the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> to an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a>, starting at a particular <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a> index.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void CopyTo(T[] array, int arrayIndex)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>array</code> T[]</dt>
    <dd><p>The one-dimensional <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a> that is the destination of the elements copied from <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>. The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a> must have zero-based indexing.</p>
</dd>
    <dt><code>arrayIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
    <dd><p>The zero-based index in <code class="paramref">array</code> at which copying begins.</p>
</dd>
  </dl>









  <h4 class="section">Exceptions</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
    <dd><p><code class="paramref">array</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
    <dd><p><code class="paramref">arrayIndex</code> is less than 0.</p>
</dd>
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
    <dd><p>The number of elements in the source <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> is greater than the available space from <code class="paramref">arrayIndex</code> to the end of the destination <code class="paramref">array</code>.</p>
</dd>
  </dl>



  <a id="Hi_Common_Collections_SynList_1_GetEnumerator_" data-uid="Hi.Common.Collections.SynList`1.GetEnumerator*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_GetEnumerator" data-uid="Hi.Common.Collections.SynList`1.GetEnumerator">
  GetEnumerator()
  
  </h3>

  <div class="markdown level1 summary"><p>Returns an enumerator that iterates through the collection.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IEnumerator&lt;T&gt; GetEnumerator()</code></pre>
  </div>


  <h4 class="section">Returns</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1">IEnumerator</a>&lt;T&gt;</dt>
    <dd><p>An enumerator that can be used to iterate through the collection.</p>
</dd>
  </dl>











  <a id="Hi_Common_Collections_SynList_1_IndexOf_" data-uid="Hi.Common.Collections.SynList`1.IndexOf*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_IndexOf__0_" data-uid="Hi.Common.Collections.SynList`1.IndexOf(`0)">
  IndexOf(T)
  
  </h3>

  <div class="markdown level1 summary"><p>Determines the index of a specific item in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public int IndexOf(T item)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>item</code> <span class="xref">T</span></dt>
    <dd><p>The object to locate in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a>.</p>
</dd>
  </dl>

  <h4 class="section">Returns</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
    <dd><p>The index of <code class="paramref">item</code> if found in the list; otherwise, -1.</p>
</dd>
  </dl>











  <a id="Hi_Common_Collections_SynList_1_Insert_" data-uid="Hi.Common.Collections.SynList`1.Insert*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_Insert_System_Int32__0_" data-uid="Hi.Common.Collections.SynList`1.Insert(System.Int32,`0)">
  Insert(int, T)
  
  </h3>

  <div class="markdown level1 summary"><p>Inserts an item to the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a> at the specified index.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Insert(int index, T item)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
    <dd><p>The zero-based index at which <code class="paramref">item</code> should be inserted.</p>
</dd>
    <dt><code>item</code> <span class="xref">T</span></dt>
    <dd><p>The object to insert into the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a>.</p>
</dd>
  </dl>









  <h4 class="section">Exceptions</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
    <dd><p><code class="paramref">index</code> is not a valid index in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a>.</p>
</dd>
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
    <dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a> is read-only.</p>
</dd>
  </dl>



  <a id="Hi_Common_Collections_SynList_1_Remove_" data-uid="Hi.Common.Collections.SynList`1.Remove*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_Remove__0_" data-uid="Hi.Common.Collections.SynList`1.Remove(`0)">
  Remove(T)
  
  </h3>

  <div class="markdown level1 summary"><p>Removes the first occurrence of a specific object from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Remove(T item)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>item</code> <span class="xref">T</span></dt>
    <dd><p>The object to remove from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</dd>
  </dl>

  <h4 class="section">Returns</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
    <dd><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if <code class="paramref">item</code> was successfully removed from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>. This method also returns <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> if <code class="paramref">item</code> is not found in the original <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</dd>
  </dl>








  <h4 class="section">Exceptions</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
    <dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> is read-only.</p>
</dd>
  </dl>



  <a id="Hi_Common_Collections_SynList_1_RemoveAt_" data-uid="Hi.Common.Collections.SynList`1.RemoveAt*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_RemoveAt_System_Int32_" data-uid="Hi.Common.Collections.SynList`1.RemoveAt(System.Int32)">
  RemoveAt(int)
  
  </h3>

  <div class="markdown level1 summary"><p>Removes the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a> item at the specified index.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void RemoveAt(int index)</code></pre>
  </div>

  <h4 class="section">Parameters</h4>
  <dl class="parameters">
    <dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
    <dd><p>The zero-based index of the item to remove.</p>
</dd>
  </dl>









  <h4 class="section">Exceptions</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
    <dd><p><code class="paramref">index</code> is not a valid index in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a>.</p>
</dd>
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
    <dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList&lt;T&gt;</a> is read-only.</p>
</dd>
  </dl>



  <a id="Hi_Common_Collections_SynList_1_ToList_" data-uid="Hi.Common.Collections.SynList`1.ToList*"></a>

  <h3 id="Hi_Common_Collections_SynList_1_ToList" data-uid="Hi.Common.Collections.SynList`1.ToList">
  ToList()
  
  </h3>

  <div class="markdown level1 summary"><p>Creates a new List&lt;T&gt; containing all elements from this synchronized list.
This operation is thread-safe as it acquires a lock on the underlying data.</p>
</div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public List&lt;T&gt; ToList()</code></pre>
  </div>


  <h4 class="section">Returns</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;T&gt;</dt>
    <dd><p>A new List&lt;T&gt; containing all elements from this synchronized list.</p>
</dd>
  </dl>












</article>

        <div class="contribution d-print-none">
        </div>


      </div>

      <div class="affix">
        <nav id="affix"></nav>
      </div>
    </main>

    <div class="container-xxl search-results" id="search-results"></div>

    <footer class="border-top text-secondary">
      <div class="container-xxl">
        <div class="flex-fill">
          <span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
        </div>
      </div>
    </footer>
  </body>
</html>
